//2009/08/09 16:32:09
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>

using namespace std;

class LevelUp
{
public:
    int toNextLevel(vector <int> expN, int rec)
    {
        sort(expN.begin(), expN.end());
        for (int i=0; i<expN.size(); i++)
        {
            if (rec < expN[i])
            {
                return expN[i] - rec;
            }
        }
        return -1;
    }
};
